<?php

   require 'function.php';
   //获取所有文章数组
   $article = read_all();
   //文章索引
   $id = $_GET['id'];
   //这个是单个文章详情
   $art = null;

   foreach ($article as $key => $value) {
      if($id == $key){
        $art = $value;
        break;
      }
   }

?>

<html>
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, 
	initial-scale=1,maximum-scale=1,user-scalable=no">
	<title>采集新闻内容</title>
	<link rel="stylesheet" type="text/css" href="./style/basic.css"/>
</head>
<body>
	<div class="news">
        <!--导航条-->
        <div class="daohang">
            <ul>
                <!--<font color="#ccc">|</font>-->
            	<li>新闻</li>
            	<li>娱乐</li>
            	<li>体育</li>
            	<li>财经</li>
            	<li>科技</li>
            	<li>应急</li>
            	<li>军事</li>
            	<li class="a">原创</li>
            </ul>
            <div class="clear_both"></div>
        </div>
        
        <!--展示区-->
        <div class="show">
              <h3>标题：<?php echo $art->title;?></h3>
              <p>日期： <?php echo $art->date; ?>  </p>
              <p>类别： <?php echo $art->classify; ?>  </p>
              <p>内容： <?php echo $art->content; ?> </P> 
             
        </div>
  </div>       
   
</body>
</html>